package cn.zhfeat.hatch.service.impl;

import java.util.List;
import javax.annotation.Resource;

import cn.zhfeat.core.base.BaseServiceImpl;
import cn.zhfeat.hatch.dao.company.ICompanyDepartmentMapper;
import cn.zhfeat.hatch.dto.company.CompanyDepartmentDto;
import cn.zhfeat.hatch.entity.company.CompanyDepartment;
import cn.zhfeat.hatch.service.IDepartmentService;
import org.springframework.stereotype.Service;


/**
 * @description: 部门业务服务相关rpc内部接口实现
 *
 * @author ZhangHao
 * @date 2018年5月10日 上午10:20:08 
 * @version 1.0.0.1
 */
@Service("departmentService")
public class DepartmentServiceImpl extends BaseServiceImpl<CompanyDepartment,CompanyDepartmentDto,Long> implements IDepartmentService {

	@Resource
	private ICompanyDepartmentMapper companyDepartmentMapper;
	
	/**
	 * @description: 根据父部门编码查询其对应的全部子部门,无需分页
	 *
	 * @param dto
	 * @return 
	 * @author ZhangHao
	 * @date 2018年5月10日 上午10:25:25 
	 * @version 1.0.0.1
	 */
	@Override
	public List<CompanyDepartment> findListbyParentDeptId(
			CompanyDepartmentDto dto) {
		return companyDepartmentMapper.findListbyParentDeptId(dto);
	}

	/**
	 * 
	 * @Description: 根据天健查询部门信息
	 * 
	 * @author: ZhangHao
	 * @date:   2018年5月19日 上午9:59:32    
	 * @version 1.0.0.1
	 */
	@Override
	public CompanyDepartment getCompanyDepartment(CompanyDepartmentDto departmentDto) {
		return companyDepartmentMapper.getCompanyDepartment(departmentDto);
	}
	/**
	 * @description: 获取部门列表
	 *
	 * @param dto
	 * @return 
	 * @author ZhangHao
	 * @date 2018年7月21日 下午4:01:11 
	 * @version 1.0.0.1
	 */
	@Override
	public List<CompanyDepartment> listDepartment(CompanyDepartmentDto dto) {
		return companyDepartmentMapper.listDepartment(dto);
	}

}
